package com.yxcz.serviceImpl;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yxcz.dao.PositionDAO;
import com.yxcz.model.Position;
import com.yxcz.service.PositionService;

@Service
public class PositionServiceImpl implements PositionService {

	@Resource
	private PositionDAO positionDAO;

	@Override
	public ArrayList<Position> list(String keyword) {
	
		return null;
	}

	@Override
	public ArrayList<Position> list() {

		return positionDAO.list();
	}

	@Override
	public Position getPosition(Integer id) {
		
		return positionDAO.find(id);
	}

	@Override
	public void deleteById(Integer id) {
		positionDAO.delete(positionDAO.find(id));
	}

	@Override
	public void update(Position form) {
	    positionDAO.save(form);
		
	}

	@Override
	public void add(Position form) throws Exception {
		positionDAO.add(form);
		
	}
	

}
